Skip to content

Conversation

ulpsilva
Copy link

@ulpsilva ulpsilva commented Aug 8, 2017

I fix the SQL side in the issue

return (user.scope === scope && client.scope === scope && scope !== null) ? scope : false
function validateScope(token, client, scope) {
console.log("validateScope", token, client, scope);
return (user.scope === client.scope) ? scope : false
Copy link

@jankal jankal Jan 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user is not defined! How should this ever work?

The method signature is as follows:

AbstractGrantType.prototype.validateScope = function(user, client, scope) {}

See oauthjs/node-oauth2-server

@@ -260,7 +262,7 @@ module.exports = {
revokeToken: revokeToken,
saveToken: saveToken,//saveOAuthAccessToken, renamed to
saveAuthorizationCode: saveAuthorizationCode, //renamed saveOAuthAuthorizationCode,
validateScope: validateScope,
// validateScope: validateScope,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validateScope is a key part of this oauth procedure. Why do you remove it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants